lib/deploy: Fix staged deployments with no kargs
authorColin Walters <walters@verbum.org>
Fri, 27 Apr 2018 15:53:43 +0000 (11:53 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 27 Apr 2018 17:48:21 +0000 (17:48 +0000)
commitde4c7105f019f514a56f0ec6911b865b3f2d58a1
treeae007a01f0305f5acbd3a748b6a22256c7832cc8
parentdc4aa346a360d4fd30496f701d61a438039ec8af
lib/deploy: Fix staged deployments with no kargs

Testing out the staged API with rpm-ostree, ostree-prepare-root.service
in the initramfs was failing.  Turned out that was because we didn't
have a `root=` kernel argument.  Which was because we didn't have
any kernel arguments at all except `ostree=`.

That in turn was because we weren't loading the bootloader config
from the merge deployment.

The serialized deployment data holds the unique identity of
(osname, checksum, deployserial) - look for the real merge deployment
in our deployment list which has the bootloader arguments we need.

This issue was entirely masked by the `ostree admin deploy` command
which itself explicitly loads the merge deployment's kernel arguments
in every case - it never passes the `NULL` default down.  A followup
patch will fix that.

Closes: #1558
Approved by: jlebon
src/libostree/ostree-sysroot-deploy.c